<template>
    <el-container>
        <el-header>
            <el-container>
                <el-button type="primary" @click="showAdd">增加</el-button>
            </el-container>
        </el-header>
        <el-main>
            <el-table :data="tableData" stripe element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" v-loading.fullscreen.lock="loading">
                <el-table-column type="index" width="50" />
                <el-table-column prop="title" label="图文名称" width="360" />
                <el-table-column prop="url" label="跳转链接" min-width="480" />
                <el-table-column prop="sort" label="排序" sortable width="100" />
                <el-table-column prop="createTime" label="创建时间" sortable width="200" />
                <el-table-column prop="mu" label="操作" width="200">
                    <template #="{mu}">
                        <PlainButton text="编辑" :click="()=>showUpdate(mu)" />
                        <PlainButton text="删除" :click="()=>doDelete(mu)" />
                    </template>
                </el-table-column>
            </el-table>
            <SearchPagination :currentPage="currentPage" :total="total" :limit="limit" @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange" />
        </el-main>
    </el-container>
</template>

<script>
import { page, remove } from '@/chaos/functions/mixin/crud';
import { pushcreate, pushupdate } from '@/chaos/functions/mixin/pushcrud';

export default {
    name: 'imagetext',
    mixins: [page, remove, pushcreate, pushupdate],
    data() {
        return {
            domain: 'iya_info',
            addPath: 'addImagetext',
            updatePath: 'updateImagetext'
        };
    },
    created() {
        this.search();
    }
};
</script>
<style scoped>
</style>
